<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a href="{:url('paper/index')}">问卷调查</a></li>
		<li><a href="{:url('paper/add')}">添加</a></li>
	</ul>


	<form method="post" class="js-ajax-form margin-top-20" action="{:url('paper/listOrder')}">



		<div class="table-actions">
			<button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
		</div>
		<table class="table table-hover table-bordered margin-top-20">
			<thead>
			<tr>
				<th width="50">{:lang('SORT')}</th>
				<th width="50">ID</th>
				<th>标题</th>
				<th>结束时间</th>
				<th>状态</th>

				<th width="320">{:lang('ACTIONS')}</th>
			</tr>
			</thead>
			<tbody>
			<php>

			</php>
			<foreach name="list" item="vo">
				<tr>
					<td>
						<input name="list_orders[{$vo.id}]" class="input-order" type="text" value="{$vo.list_order}">
					</td>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td>{:date('Y-m-d H:i:s',$vo['endtime'])}</td>
					<td>{$status[$vo['status']]}</td>
					<td>
						<a class="btn btn-xs btn-primary" href="javascript:parent.openIframeLayer('{:url('ask/index',array('listid'=>$vo['id'],'status'=>$vo['status']))}')">问题列表</a>

						<a class="btn btn-xs btn-success" href="javascript:parent.openIframeLayer('{:url('userask/index',array('listid'=>$vo['id']))}')">问卷统计</a>

						<if condition="$vo['status'] eq 0">
							<a class="btn btn-xs btn-primary js-ajax-dialog-btn" data-msg="启用之后，该问卷将线上生效，确定操作？" href="{:url('paper/setstatus',array('id'=>$vo['id']))}">上线启用</a>
						</if>
						<if condition="$vo['status'] eq 1">

							<a class="btn btn-xs btn-danger js-ajax-dialog-btn" data-msg="禁用用之后，该问卷将不在线上展示，确定操作？"  href="{:url('paper/cancelstatus',array('id'=>$vo['id']))}">终止禁用</a>
						</if>

						<if condition="$vo['status'] eq 0 || $vo['status'] eq 2">
							<a class="btn btn-xs btn-primary" href="{:url('paper/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('paper/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
						</if>

					</td>
				</tr>
			</foreach>

			</tbody>
		</table>
	</form>
	<div class="pagination">{$page}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>